package com.dsz.usercenter.common;

import lombok.Data;

import java.io.Serializable;

/**
 * 通用结果返回类
 * @param <T>
 */
@Data
public class BaseResponse<T> implements Serializable {
    private static final long serialVersionUID = 3293309659388875895L;
    /**
     * 状态码
     */
    private Integer code;
    /**
     * 返回给前端的数据
     */
    private T data;
    /**
     * 错误信息
     */
    private String message;
    /**
     * 错误信息的具体描述
     */
    private String description;

    public BaseResponse(Integer code, T data, String message, String description) {
        this.code = code;
        this.data = data;
        this.message = message;
        this.description = description;
    }
}
